import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)

import Home from '@/view/Home.vue'
import News from '@/view/News.vue'
import Sports from '@/view/Sports.vue'
import SportsHome from '@/view/sportsSon/SportsHome'
import SportsDomestic from '@/view/sportsSon/SportsDomestic'
import SportsForeign from '@/view/sportsSon/SportsForeign'

const router = new VueRouter({
  routes: [
    {
      path: '/',
      component: Home
    },
    {
      path: '/news',
      component: News
    },
    {
      path: '/sports',
      component: Sports,
      children: [
        {
          path: 'sportsHome',
          component: SportsHome
        },
        {
          path: 'sportsDomestic',
          component: SportsDomestic
        },
        {
          path: 'sportsForeign',
          component: SportsForeign
        }
      ]
    }
  ]
})

export default router
